abstract class Animal2 {
    void sound() {
        System.out.println("Animal makes a sound");
    }
}

class Dog2 extends Animal2 {
    @Override
    void sound() {
        super.sound();  // 调用父类的sound方法
        System.out.println("Dog barks");
    }
}

public class abstract_Main2 {
    public static void main(String[] args) {
        Dog2 dog = new Dog2();
        dog.sound();
    }
}